package com.example.nonacademic_education.dao;

import com.example.nonacademic_education.entity.AnyConstant;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AnyConstantDao {
    @Select("select value from any_constant where id =1")
    String getHeadmaster();

    @Select("select value from any_constant where id =#{id}")
    String getValueById(Long id);

    @Select("select * from any_constant")
    List<AnyConstant> getList();

    @Select("select count(id) from any_constant")
    Integer count();

    @Update("update any_constant set tag=#{tag},value=#{value},note=#{note} where id=#{id}")
    Integer updateOne(AnyConstant anyConstant);
}
